package com.ithema.mArrayList;

import com.ithema.domain.Car;

import java.util.ArrayList;

public class Testkao {
    public static void main(String[] args) {
        ArrayList<Car> list = new ArrayList<>();
        Car c1=new Car("宝马",300000,"白色");
        Car c2=new Car("五菱宏光",30000,"红色");
        Car c3=new Car("奔驰",588888,"黑色");
        list.add(c1);
        list.add(c2);
        list.add(c3);
        for (int i = 0; i < list.size(); i++) {
            if(list.get(i).getPrice()>100000){
                System.out.println(list.get(i).getBrand()+","+list.get(i).getPrice()+","+list.get(i).getColor());
            }
        }

    }
}
